package com.coocaa.ops.admin.v1.cornericon.provider.impl;

import com.coocaa.ops.admin.v1.cornericon.biz.impl.CornerIconBizImpl;
import com.coocaa.ops.admin.v1.cornericon.provider.ICornerIconQueryProvider;
import com.coocaa.ops.admin.v1.cornericontype.biz.CornerIconTypeBizImpl;
import com.coocaa.ops.common.core.biz.cornericon.entity.GlobalCornerIconEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author bijiahao
 * @date : 2018/6/19.
 * @description: 角标 查询提供者实现
 *
 */
@Service
public class CornerIconQueryProviderImpl implements ICornerIconQueryProvider {

    @Autowired
    private CornerIconBizImpl cornerIconBiz;
    @Autowired
    private CornerIconTypeBizImpl cornerIconTypeBiz;



    @Override
    public GlobalCornerIconEntity getDetailInfo(Integer id) {
        GlobalCornerIconEntity entity = cornerIconBiz.queryById(id);
        entity.setCornerIconType(cornerIconTypeBiz.queryById(entity.getTypeId()));
        return entity;
    }


}
